package org.springds3.d1.test1;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

@Component ("userAction")
public class UserAction {
//    @Autowired
    List<UserService> userServices;





    public UserAction(){}
//    @Autowired

    public UserAction(UserService userService){
        this.userService = userService;
    }



//   @Autowired
//   @Qualifier("userService2")
    @Resource
    private  UserService userService;

    public UserService getUserService() {
        return userService;
    }
//    @Autowired
//        @Resource
    public void setUserService(UserService userService) {
        this.userService = userService;
    }

    public void index(){
//        System.out.println(this.userServices.size());
        userService.getUserName(20);
    }






}
